<?php
	include_once("../model/Acesso.class.php");
	include_once("../model/Mensagem.class.php");
	include_once("../model/Fornecedor.class.php");
	$acesso = new Acesso();
	$codigoPagina = "7";
	if ($acesso->verificaPermissaoUsuario($codigoPagina)){
		$banco = $acesso->getBanco();
?>
<html>
<head>
<title>:.:.:INGECAMP:.:.:</title>
<link href="../arquivosExtra/estilo.css" rel="stylesheet" type="text/css">
<style type="text/css">
	body{
		background-color:#FFFFFF;
		background-image:none;
	}
</style>
<script language="javascript" src="../arquivosExtra/funcoesJavaScript.js"></script>
</head>

<body topmargin="0" leftmargin="0">
<table width="100%" border="2" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#CCCCCC" class="letraCabecalho">SIG-INGECAMP- Sistema de Gerenciamento Geral - INGECAMP - Via Internet</td>
  </tr>
  <tr>
    <td height="21" align="center" valign="top">
<table width="100%" border="0" cellspacing="0">
        <tr> 
          <td height="57" valign="bottom"><table width="100%" border="0" cellspacing="0">
              <tr> 
                <td height="26" colspan="5" align="center" class="letraCampo"><img src="../imagens/logo.jpg" width="569" height="96"></td>
              </tr>
              <tr> 
                <td height="22" valign="bottom">&nbsp;</td>
                <td colspan="2" valign="middle">&nbsp;</td>
                <td valign="middle">&nbsp;</td>
                <td valign="bottom">&nbsp;</td>
              </tr>
              <tr> 
                <td width="12%" height="39" valign="bottom">&nbsp;</td>
                <td width="61%" valign="middle"> <div align="right"> 
                    <input type="button" name="Submit2" value="Pagina Principal" class="botaoUsuario2" onClick="Redireciona()">
                  </div></td>
                <td width="2%" valign="middle">&nbsp;</td>
                <td width="11%" valign="middle"><div align="center"> 
                    <input type="button" name="Submit223" value="Logoff" class="botaoUsuario2" onClick="formLogoff()">
                  </div></td>
                <td width="14%" valign="bottom">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table>
      <form name="form1" method="post" action="../control/controlCadFornecedor.php">
        <table width="800" height="234" border="2" align="center" cellpadding="0" cellspacing="0">
          <tr> 
            <td width="23%" height="21" bgcolor="#CCCCCC" class="letraCabecalho"> 
              <div align="center" class="letraCabecalho">Cadastro de Fornecedor</div></td>
          </tr>
          <tr> 
            <td height="172" align="left" valign="top"><table width="100%" border="0">
                <tr> 
                  <td height="21" align="right"><table width="100%" border="0">
                    <tr>
                      <td width="14%" align="right"><span class="letraCampo">Raz&atilde;o Social:</span></td>
                      <td width="35%"><input name="rs" type="text" id="rs" size="50" maxlength="100" class="caixaTexto"></td>
                      <td width="14%" align="right"><span class="letraCampo">Nome Fantasia:</span></td>
                      <td width="37%"><input name="nf" type="text" id="nf" size="50" maxlength="50" class="caixaTexto"></td>
                    </tr>
                  </table></td>
                </tr>
                <tr> 
                  <td height="32" align="right" class="letraCampo"><table width="100%" border="0">
                    <tr>
                      <td width="15%" align="right" class="letraCampo">CNPJ:</td>
                      <td width="15%"><input name="cnpj" type="text" id="cnpj" size="20" maxlength="18" class="caixaTexto" onKeyPress="mascara(this, mcnpj)"></td>
                      <td width="7%" align="right" class="letraCampo">Rua:</td>
                      <td width="33%"><input name="rua" type="text" id="rua" size="50" maxlength="50" class="caixaTexto"></td>
                      <td width="5%" align="right" class="letraCampo">N&ordm;:</td>
                      <td width="25%"><input name="numero" type="text" id="numero" size="10" maxlength="8" class="caixaTexto" onKeyPress="mascara(this, mnum)"></td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td height="21" align="right" class="letraCampo"><table width="100%" border="0">
                    <tr>
                      <td width="14%" align="right" class="letraCampo">Bairro:</td>
                      <td width="24%"><input name="bairro" type="text" id="bairro" size="30" maxlength="30" class="caixaTexto"></td>
                      <td width="8%" align="right" class="letraCampo">Cidade:</td>
                      <td width="22%"><input name="cidade" type="text" id="cidade" size="30" maxlength="30" class="caixaTexto"></td>
                      <td width="4%" align="right" class="letraCampo">UF:</td>
                      <td width="7%">
                      <select name="uf" class="caixaTexto" id="uf">
                        <option value="AC">AC</option>
                        <option value="AL">AL</option>
                        <option value="AP">AP</option>
                        <option value="AM">AM</option>
                        <option value="BA">BA</option>
                        <option value="CE">CE</option>
                        <option value="DF">DF</option>
                        <option value="ES">ES</option>
                        <option value="GO">GO</option>
                        <option value="MA">MA</option>
                        <option value="MT">MT</option>
                        <option value="MS">MS</option>
                             <option value="MG">MG</option>
                             <option value="PA">PA</option>
                             <option value="PB">PB</option>
                             <option value="PE">PE</option>
                             <option value="PI">PI</option>
                             <option value="RJ">RJ</option>
                             <option value="RN">RN</option>
                             <option value="RS">RS</option>
                             <option value="RO">RO</option>
                             <option value="RR">RR</option>
                             <option value="SC">SC</option>
                             <option value="SP" selected>SP</option>
                             <option value="SE">SE</option>
                             <option value="TO">TO</option>
                      </select>
                       </td>
                      <td width="5%" align="right" class="letraCampo">CEP:</td>
                      <td width="16%"><input name="cep" type="text" id="cep" size="10" maxlength="9" class="caixaTexto" onKeyPress="mascara(this, mcep)"></td>
                    </tr>
                  </table></td>
                </tr>
                <tr> 
                  <td height="21" align="right" class="letraCampo"><table width="100%" border="0">
                    <tr>
                      <td width="15%" align="right" class="letraCampo">Telefone:</td>
                      <td width="11%"><input name="telefone" type="text" id="telefone" size="15" maxlength="14" class="caixaTexto" onKeyPress="mascara(this, mtel)"></td>
                      <td width="6%" align="right" class="letraCampo">Fax:</td>
                      <td width="11%"><input name="fax" type="text" id="fax" size="15" maxlength="14" class="caixaTexto" onKeyPress="mascara(this, mtel)"></td>
                      <td width="8%" align="right" class="letraCampo">Email:</td>
                      <td width="49%"><input name="email" type="text" id="email" size="50" maxlength="50" class="caixaTexto"></td>
                      </tr>
                  </table></td>
                </tr>
              </table>
              <table width="100%" border="0">
                <tr>
                  <td width="14%" height="70" align="right" valign="top" class="letraCampo">Obs:</td>
                  <td width="86%" valign="top"><textarea name="obs" cols="110" rows="10" class="caixaTexto" id="obs"></textarea></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td height="37" align="left" valign="top"> <div align="center"> 
                <table width="100%" border="0">
                  <tr> 
                    <td align="right"><input type="submit" name="Submit3" value="Cadastrar" class="botoes"></td>
                    <td>&nbsp;</td>
                    <td> <input type="button" name="Submit3" value="Cancelar" class="botoes" onClick="Redireciona()"></td>
                  </tr>
                </table>
              </div></td>
          </tr>
        </table>
        <p>&nbsp;</p>
     </form>
      <p>&nbsp;</p>
  </tr>
  <tr>
    <td height="21" bgcolor="#CCCCCC"><table width="100%" border="0" cellspacing="0">
        <tr> 
           <td width="302" align="right"> 
            <input name="textfield" type="text" class="informacoesLogin" value="Usu&aacute;rio:  <?php $x = $acesso->getLoginUsuarioLogado(); echo("$x"); ?>" readonly="readonly"> 
          </td>
          <td width="17">&nbsp;</td>
          <td width="144"><input name="textfield2" type="text" class="informacoesLogin" value="Entrada &agrave;s:  <?php $y = $acesso->getHoraAcesso(); echo("$y"); ?>" readonly="readonly"></td>
          <td width="17">&nbsp;</td>
          <td width="303">
<input name="textfield22" type="text" class="informacoesLogin" value="Data: <?php $z = $acesso->getDataAcesso(); echo("$z"); ?>" readonly="readonly">
          </td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>
<?php
}else{
		$msg = new Mensagem();
		$msg->informaMensagem(005,$acesso->getPaginaPrincipal());
	}?>